// 删除模块
// 支持批量删除 单个删除
import * as server from '@/utils/http'
import URL from '@/environment/global'
// 解构赋值
let {
  HTTP_URL
} = URL

/**
 * 删除系别
 * method: DELETE
 * @param id | 删除的系别名
 */
export function deleteDepart (id) {
  return server.del(`${HTTP_URL}/department/${id}`)
}

/**
 * 删除菜单
 * @param id | 菜单id
 */
export function deleteMenu (id) {
  return server.del(`${HTTP_URL}/menu/${id}`)
}

/**
 * 删除角色
 * method: DELETE
 * @param id | 角色id
 */
export function deleteRole (id) {
  return server.del(`${HTTP_URL}/role/${id}`)
}

/**
 * 删除角色
 * method: DELETE
 * @param id | 用户id
 */
export function deleteUser (id) {
  return server.del(`${HTTP_URL}/user/${id}`)
}

/**
 * 删除预算编制阶段
 * method: DELETE
 * @param id | 预算编制阶段id
 */
export function deleteStage (id) {
  return server.del(`${HTTP_URL}/budget/time/${id}`)
}

/**
 * 删除预算填报阶段
 * method: DELETE
 * @param id | 预算填报阶段id
 */
export function deleteFill (id) {
  return server.del(`${HTTP_URL}/budget/write/${id}`)
}

/**
 * 删除预算填报阶段 树级表格已填写的数据
 * method: DELETE
 * @param {String} id 已填写的项目id
 */
export function deleteWritePrj (id) {
  return server.del(`${HTTP_URL}/budget/write/${id}`)
}
/*
 * 删除预算外编制类型
 * method: DELETE
 * @param id | 预算外编制id
 */
export function deleteCategoryOffBudget (id) {
  return server.del(`${HTTP_URL}/off/budget/category/${id}`)
}

/**
 * 删除预算外编制内容
 * @param {*} id
 */
export function deleteContentOffBudget (id) {
  return server.del(`${HTTP_URL}/off/budget/sum/${id}`)
}

/**
 * 删执行阶段的报单类型
 * @param {*} id
 */
export function deleteCategoryExecuteStage (id) {
  return server.del(`${HTTP_URL}/bill/category/${id}`)
}

/**
 * 删除报单
 */
export function deleteBillWrite (id) {
  return server.del(`${HTTP_URL}/bill/write/${id}`)
}

/**
 * 删除回执单
 */
export function deleteReceiptWrite (id) {
  return server.del(`${HTTP_URL}/receipt/write/${id}`)
}
